PyPI Manager
Warning
The JupyterLab development team is excited to have a robust
third-party extension community. However, we do not review
third-party extensions, and some extensions may introduce security
risks or contain malicious code that runs on your machine. Moreover in order
to work, this panel needs to fetch data from web services. Do you agree to
activate this feature?
Please read the privacy policy.
Installed
No entries
Discover
No entries
Open Tabs
Close All
Kernels
Shut Down All
Python [conda env:base] *
- Untitled4.ipynb (f42694b4)
- Untitled4.ipynb
- Social media Analysis.ipynb (8c44abd1)
- Social media Analysis.ipynb
Language servers
Shut Down All
Recently Closed
Forget All
Workspaces
Delete All
- default
Terminals
Shut Down All
Social media Analysis.ipynb
No Headings
The table of contents shows headings in notebooks and supported files.
/DA Python/
Name
...
ModifiedLast Modified
File Size
- DA.ipynblast mo.32.3 KB
- DA6intropython.ipynb2mo ago5.5 KB
- Social media Analysis.ipynb6m ago245.3 KB
- Untitled.ipynblast mo.72 B
- Untitled1.ipynblast mo.154 KB
- Untitled2.ipynblast mo.99 KB
- Untitled3.ipynb6d ago121.9 KB
- airquality.csv2mo ago5.2 KB
- Bakery.csv2mo ago1 MB
- Customer-Churn-Records.csvlast mo.817.8 KB
- diabetes.csvlast mo.22.6 KB
- social_media_analysis.py6m ago84.8 KB
- social_media_engagement1.csvyesterday6.3 KB
- untitled.txt2mo ago0 B
- Social media Analysis.ipynb
Kernel status: Idle Executed 2 cellsElapsed time: 3 seconds
[1]:
import pandas as pd
[2]:
import seaborn as sns
[3]:
df = pd.read_csv("social_media_engagement1.csv")
[4]:
df
[4]:
| post_id | platform | post_type | post_time | likes | comments | shares | post_day | sentiment_score | |
|---|---|---|---|---|---|---|---|---|---|
| 0 | 1 | image | 8/17/2023 14:45 | 2121 | 474 | 628 | Thursday | positive | |
| 1 | 2 | carousel | 5/14/2023 0:45 | 3660 | 432 | 694 | Sunday | neutral | |
| 2 | 3 | poll | 2/21/2023 16:15 | 4955 | 408 | 688 | Tuesday | negative | |
| 3 | 4 | image | 11/16/2023 0:45 | 1183 | 90 | 187 | Thursday | negative | |
| 4 | 5 | video | 5/23/2023 0:30 | 3499 | 247 | 286 | Tuesday | positive | |
| ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
| 95 | 96 | carousel | 7/12/2023 17:45 | 36 | 294 | 911 | Wednesday | positive | |
| 96 | 97 | video | 10/27/2023 23:45 | 314 | 108 | 458 | Friday | neutral | |
| 97 | 98 | text | 8/5/2023 8:45 | 229 | 179 | 38 | Saturday | positive | |
| 98 | 99 | poll | 12/29/2023 12:15 | 5000 | 500 | 204 | Friday | positive | |
| 99 | 100 | image | 6/6/2023 21:00 | 4483 | 357 | 25 | Tuesday | neutral |
100 rows × 9 columns
[5]:
df.shape
[5]:
(100, 9)
<class 'pandas.core.frame.DataFrame'> RangeIndex: 100 entries, 0 to 99 Data columns (total 9 columns): # Column Non-Null Count Dtype --- ------ -------------- ----- 0 post_id 100 non-null int64 1 platform 100 non-null object 2 post_type 100 non-null object 3 post_time 100 non-null object 4 likes 100 non-null int64 5 comments 100 non-null int64 6 shares 100 non-null int64 7 post_day 100 non-null object 8 sentiment_score 100 non-null object dtypes: int64(4), object(5) memory usage: 7.2+ KB
[7]:
Index(['post_id', 'platform', 'post_type', 'post_time', 'likes', 'comments',
'shares', 'post_day', 'sentiment_score'],
dtype='object')[8]:
| post_id | likes | comments | shares | |
|---|---|---|---|---|
| count | 100.000000 | 100.000000 | 100.00000 | 100.000000 |
| mean | 50.500000 | 2381.810000 | 202.66000 | 415.650000 |
| std | 29.011492 | 1632.573284 | 138.84067 | 283.877601 |
| min | 1.000000 | 15.000000 | 10.00000 | 16.000000 |
| 25% | 25.750000 | 895.750000 | 89.75000 | 183.000000 |
| 50% | 50.500000 | 2220.000000 | 171.00000 | 356.500000 |
| 75% | 75.250000 | 3593.250000 | 299.00000 | 689.500000 |
| max | 100.000000 | 5000.000000 | 500.00000 | 993.000000 |
[9]:
post_id 0 platform 0 post_type 0 post_time 0 likes 0 comments 0 shares 0 post_day 0 sentiment_score 0 dtype: int64
[10]:
platform Instagram 36 Facebook 32 Twitter 32 Name: count, dtype: int64
[12]:
| post_id | platform | post_type | post_time | likes | comments | shares | post_day | sentiment_score | |
|---|---|---|---|---|---|---|---|---|---|
| 2 | 3 | poll | 2/21/2023 16:15 | 4955 | 408 | 688 | Tuesday | negative | |
| 5 | 6 | carousel | 5/5/2023 20:00 | 256 | 186 | 211 | Friday | neutral | |
| 6 | 7 | image | 2/26/2023 11:45 | 1982 | 30 | 906 | Sunday | positive | |
| 7 | 8 | text | 10/28/2023 19:30 | 1274 | 45 | 216 | Saturday | neutral | |
| 16 | 17 | poll | 7/5/2023 5:15 | 2872 | 10 | 736 | Wednesday | positive | |
| 23 | 24 | carousel | 1/1/2023 20:00 | 5000 | 80 | 399 | Sunday | positive | |
| 26 | 27 | text | 10/6/2023 10:00 | 3161 | 162 | 137 | Friday | positive | |
| 31 | 32 | image | 7/1/2023 14:45 | 4665 | 202 | 183 | Saturday | positive | |
| 34 | 35 | image | 6/6/2023 19:30 | 1309 | 201 | 852 | Tuesday | negative | |
| 39 | 40 | carousel | 8/4/2023 12:45 | 447 | 333 | 845 | Friday | negative | |
| 41 | 42 | video | 11/23/2023 2:00 | 4929 | 252 | 730 | Thursday | negative | |
| 43 | 44 | text | 7/6/2023 8:00 | 3259 | 50 | 177 | Thursday | negative | |
| 45 | 46 | text | 5/16/2023 22:15 | 2251 | 380 | 427 | Tuesday | positive | |
| 49 | 50 | text | 7/12/2023 0:00 | 1551 | 206 | 127 | Wednesday | negative | |
| 53 | 54 | image | 1/21/2023 1:00 | 4297 | 360 | 825 | Saturday | negative | |
| 55 | 56 | image | 3/13/2023 23:15 | 3401 | 190 | 230 | Monday | negative | |
| 56 | 57 | video | 7/13/2023 9:15 | 4846 | 134 | 498 | Thursday | neutral | |
| 59 | 60 | carousel | 5/19/2023 4:30 | 4763 | 332 | 956 | Friday | positive | |
| 60 | 61 | video | 12/31/2023 22:30 | 3544 | 167 | 761 | Sunday | negative | |
| 63 | 64 | carousel | 4/19/2023 19:45 | 130 | 452 | 724 | Wednesday | neutral | |
| 64 | 65 | image | 9/20/2023 6:00 | 3982 | 314 | 326 | Wednesday | positive | |
| 67 | 68 | video | 12/28/2023 16:45 | 560 | 486 | 677 | Thursday | negative | |
| 70 | 71 | video | 4/10/2023 0:00 | 3398 | 261 | 630 | Monday | neutral | |
| 73 | 74 | video | 4/14/2023 10:30 | 5000 | 454 | 744 | Friday | positive | |
| 75 | 76 | text | 7/27/2023 19:15 | 2153 | 81 | 114 | Thursday | neutral | |
| 77 | 78 | poll | 1/19/2023 7:15 | 2990 | 30 | 365 | Thursday | positive | |
| 78 | 79 | carousel | 12/13/2023 4:45 | 4678 | 189 | 785 | Wednesday | positive | |
| 81 | 82 | carousel | 11/19/2023 12:30 | 4656 | 314 | 757 | Sunday | negative | |
| 82 | 83 | video | 12/6/2023 4:00 | 5000 | 173 | 792 | Wednesday | negative | |
| 86 | 87 | text | 5/23/2023 22:30 | 15 | 70 | 454 | Tuesday | neutral | |
| 89 | 90 | poll | 3/19/2023 4:00 | 3195 | 109 | 243 | Sunday | negative | |
| 92 | 93 | carousel | 5/7/2023 0:30 | 951 | 432 | 734 | Sunday | negative | |
| 94 | 95 | poll | 3/7/2023 19:15 | 3005 | 124 | 517 | Tuesday | positive | |
| 95 | 96 | carousel | 7/12/2023 17:45 | 36 | 294 | 911 | Wednesday | positive | |
| 98 | 99 | poll | 12/29/2023 12:15 | 5000 | 500 | 204 | Friday | positive | |
| 99 | 100 | image | 6/6/2023 21:00 | 4483 | 357 | 25 | Tuesday | neutral |
[13]:
| post_id | platform | post_type | post_time | likes | comments | shares | post_day | sentiment_score | |
|---|---|---|---|---|---|---|---|---|---|
| 2 | 3 | poll | 2/21/2023 16:15 | 4955 | 408 | 688 | Tuesday | negative | |
| 5 | 6 | carousel | 5/5/2023 20:00 | 256 | 186 | 211 | Friday | neutral | |
| 6 | 7 | image | 2/26/2023 11:45 | 1982 | 30 | 906 | Sunday | positive | |
| 7 | 8 | text | 10/28/2023 19:30 | 1274 | 45 | 216 | Saturday | neutral | |
| 16 | 17 | poll | 7/5/2023 5:15 | 2872 | 10 | 736 | Wednesday | positive |
[15]:
| post_id | platform | post_type | post_time | likes | comments | shares | post_day | sentiment_score | |
|---|---|---|---|---|---|---|---|---|---|
| 0 | 1 | image | 8/17/2023 14:45 | 2121 | 474 | 628 | Thursday | positive | |
| 1 | 2 | carousel | 5/14/2023 0:45 | 3660 | 432 | 694 | Sunday | neutral | |
| 8 | 9 | video | 5/2/2023 6:15 | 317 | 249 | 221 | Tuesday | neutral | |
| 12 | 13 | carousel | 11/11/2023 15:45 | 45 | 78 | 375 | Saturday | negative | |
| 14 | 15 | carousel | 1/9/2023 20:00 | 889 | 314 | 262 | Monday | positive | |
| 19 | 20 | image | 2/2/2023 16:00 | 455 | 86 | 79 | Thursday | positive | |
| 25 | 26 | carousel | 10/5/2023 6:30 | 1992 | 70 | 515 | Thursday | negative | |
| 27 | 28 | poll | 3/1/2023 8:00 | 2083 | 500 | 388 | Wednesday | neutral | |
| 28 | 29 | image | 1/7/2023 10:30 | 548 | 153 | 731 | Saturday | negative | |
| 29 | 30 | carousel | 2/3/2023 0:30 | 4594 | 216 | 739 | Friday | positive | |
| 30 | 31 | poll | 9/10/2023 13:45 | 4795 | 449 | 978 | Sunday | negative | |
| 35 | 36 | video | 4/8/2023 19:15 | 5000 | 500 | 43 | Saturday | positive | |
| 36 | 37 | video | 5/11/2023 0:30 | 4245 | 59 | 83 | Thursday | neutral | |
| 38 | 39 | video | 1/1/2023 6:00 | 5000 | 430 | 980 | Sunday | neutral | |
| 46 | 47 | poll | 8/8/2023 17:45 | 4726 | 44 | 993 | Tuesday | negative | |
| 47 | 48 | video | 3/22/2023 3:15 | 5000 | 232 | 16 | Wednesday | negative | |
| 57 | 58 | video | 12/27/2023 4:00 | 2204 | 116 | 728 | Wednesday | neutral | |
| 61 | 62 | carousel | 1/27/2023 15:45 | 3742 | 227 | 849 | Friday | negative | |
| 65 | 66 | text | 1/3/2023 3:00 | 2265 | 39 | 318 | Tuesday | positive | |
| 66 | 67 | carousel | 4/23/2023 8:15 | 2026 | 390 | 165 | Sunday | negative | |
| 69 | 70 | text | 6/12/2023 9:30 | 3094 | 86 | 965 | Monday | negative | |
| 71 | 72 | carousel | 5/5/2023 16:45 | 1690 | 257 | 656 | Friday | neutral | |
| 72 | 73 | text | 7/18/2023 22:00 | 3026 | 11 | 761 | Tuesday | positive | |
| 74 | 75 | video | 7/26/2023 20:15 | 5000 | 500 | 404 | Wednesday | positive | |
| 79 | 80 | text | 6/25/2023 15:15 | 553 | 320 | 312 | Sunday | positive | |
| 80 | 81 | video | 1/4/2023 18:30 | 2642 | 33 | 413 | Wednesday | neutral | |
| 83 | 84 | carousel | 10/3/2023 19:00 | 1203 | 263 | 417 | Tuesday | negative | |
| 84 | 85 | text | 7/6/2023 7:00 | 2566 | 368 | 304 | Thursday | neutral | |
| 87 | 88 | text | 5/3/2023 12:30 | 3404 | 244 | 67 | Wednesday | positive | |
| 90 | 91 | carousel | 9/15/2023 0:45 | 3956 | 402 | 462 | Friday | negative | |
| 91 | 92 | video | 2/23/2023 17:15 | 1857 | 216 | 344 | Thursday | positive | |
| 93 | 94 | image | 11/27/2023 4:30 | 1694 | 207 | 290 | Monday | positive |
[16]:
| post_id | platform | post_type | post_time | likes | comments | shares | post_day | sentiment_score | |
|---|---|---|---|---|---|---|---|---|---|
| 0 | 1 | image | 8/17/2023 14:45 | 2121 | 474 | 628 | Thursday | positive | |
| 1 | 2 | carousel | 5/14/2023 0:45 | 3660 | 432 | 694 | Sunday | neutral | |
| 8 | 9 | video | 5/2/2023 6:15 | 317 | 249 | 221 | Tuesday | neutral | |
| 12 | 13 | carousel | 11/11/2023 15:45 | 45 | 78 | 375 | Saturday | negative | |
| 14 | 15 | carousel | 1/9/2023 20:00 | 889 | 314 | 262 | Monday | positive |
[18]:
| post_id | platform | post_type | post_time | likes | comments | shares | post_day | sentiment_score | |
|---|---|---|---|---|---|---|---|---|---|
| 3 | 4 | image | 11/16/2023 0:45 | 1183 | 90 | 187 | Thursday | negative | |
| 4 | 5 | video | 5/23/2023 0:30 | 3499 | 247 | 286 | Tuesday | positive | |
| 9 | 10 | carousel | 5/11/2023 11:00 | 1878 | 225 | 438 | Thursday | neutral | |
| 10 | 11 | text | 12/8/2023 2:15 | 1446 | 44 | 52 | Friday | negative | |
| 11 | 12 | video | 6/15/2023 3:15 | 304 | 42 | 89 | Thursday | positive | |
| 13 | 14 | text | 9/30/2023 10:30 | 1333 | 144 | 123 | Saturday | positive | |
| 15 | 16 | image | 2/10/2023 13:00 | 2348 | 154 | 18 | Friday | neutral | |
| 17 | 18 | text | 7/23/2023 5:45 | 512 | 123 | 338 | Sunday | neutral | |
| 18 | 19 | text | 11/20/2023 2:00 | 2013 | 122 | 183 | Monday | positive | |
| 20 | 21 | poll | 5/2/2023 6:15 | 559 | 136 | 55 | Tuesday | neutral | |
| 21 | 22 | carousel | 1/30/2023 13:30 | 1961 | 44 | 439 | Monday | positive | |
| 22 | 23 | text | 10/2/2023 12:15 | 332 | 109 | 348 | Monday | positive | |
| 24 | 25 | poll | 5/17/2023 0:15 | 898 | 130 | 480 | Wednesday | positive | |
| 32 | 33 | video | 9/27/2023 19:00 | 119 | 147 | 240 | Wednesday | positive | |
| 33 | 34 | poll | 2/9/2023 15:30 | 2253 | 162 | 28 | Thursday | positive | |
| 37 | 38 | poll | 5/2/2023 0:30 | 2463 | 187 | 445 | Tuesday | positive | |
| 40 | 41 | carousel | 12/27/2023 11:30 | 667 | 176 | 461 | Wednesday | positive | |
| 42 | 43 | carousel | 3/31/2023 16:00 | 2586 | 97 | 85 | Friday | positive | |
| 44 | 45 | video | 12/1/2023 10:00 | 2236 | 132 | 118 | Friday | positive | |
| 48 | 49 | image | 4/17/2023 15:00 | 725 | 169 | 298 | Monday | neutral | |
| 50 | 51 | text | 2/14/2023 18:00 | 1268 | 73 | 251 | Tuesday | positive | |
| 51 | 52 | image | 7/14/2023 15:00 | 950 | 113 | 327 | Friday | positive | |
| 52 | 53 | video | 11/12/2023 17:30 | 1498 | 46 | 96 | Sunday | positive | |
| 54 | 55 | carousel | 10/2/2023 23:30 | 592 | 34 | 496 | Monday | neutral | |
| 58 | 59 | video | 12/24/2023 7:45 | 344 | 99 | 194 | Sunday | neutral | |
| 62 | 63 | image | 5/15/2023 6:30 | 227 | 163 | 127 | Monday | neutral | |
| 68 | 69 | image | 10/14/2023 18:45 | 187 | 89 | 284 | Saturday | neutral | |
| 76 | 77 | carousel | 7/5/2023 18:15 | 3571 | 102 | 96 | Wednesday | positive | |
| 85 | 86 | text | 11/25/2023 7:30 | 2416 | 50 | 62 | Saturday | positive | |
| 88 | 89 | carousel | 5/3/2023 8:00 | 2884 | 197 | 339 | Wednesday | positive | |
| 96 | 97 | video | 10/27/2023 23:45 | 314 | 108 | 458 | Friday | neutral | |
| 97 | 98 | text | 8/5/2023 8:45 | 229 | 179 | 38 | Saturday | positive |
[19]:
| post_id | platform | post_type | post_time | likes | comments | shares | post_day | sentiment_score | |
|---|---|---|---|---|---|---|---|---|---|
| 3 | 4 | image | 11/16/2023 0:45 | 1183 | 90 | 187 | Thursday | negative | |
| 4 | 5 | video | 5/23/2023 0:30 | 3499 | 247 | 286 | Tuesday | positive | |
| 9 | 10 | carousel | 5/11/2023 11:00 | 1878 | 225 | 438 | Thursday | neutral | |
| 10 | 11 | text | 12/8/2023 2:15 | 1446 | 44 | 52 | Friday | negative | |
| 11 | 12 | video | 6/15/2023 3:15 | 304 | 42 | 89 | Thursday | positive |
[21]:
| platform | sum | mean | count | |
|---|---|---|---|---|
| 0 | 15180 | 474.375000 | 32 | |
| 1 | 18906 | 525.166667 | 36 | |
| 2 | 7479 | 233.718750 | 32 |
[22]:
<Axes: xlabel='platform', ylabel='shares'>
[24]:
| platform | sum | mean | count | |
|---|---|---|---|---|
| 0 | 86392 | 2699.750000 | 32 | |
| 1 | 107994 | 2999.833333 | 36 | |
| 2 | 43795 | 1368.593750 | 32 |
[25]:
<Axes: xlabel='platform', ylabel='likes'>
[27]:
| platform | sum | mean | count | |
|---|---|---|---|---|
| 0 | 7965 | 248.906250 | 32 | |
| 1 | 8368 | 232.444444 | 36 | |
| 2 | 3933 | 122.906250 | 32 |
[28]:
<Axes: xlabel='platform', ylabel='comments'>
[29]:
| post_id | platform | post_type | post_time | likes | comments | shares | post_day | sentiment_score | |
|---|---|---|---|---|---|---|---|---|---|
| 0 | 1 | image | 8/17/2023 14:45 | 2121 | 474 | 628 | Thursday | positive | |
| 1 | 2 | carousel | 5/14/2023 0:45 | 3660 | 432 | 694 | Sunday | neutral | |
| 2 | 3 | poll | 2/21/2023 16:15 | 4955 | 408 | 688 | Tuesday | negative | |
| 3 | 4 | image | 11/16/2023 0:45 | 1183 | 90 | 187 | Thursday | negative | |
| 4 | 5 | video | 5/23/2023 0:30 | 3499 | 247 | 286 | Tuesday | positive | |
| ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
| 95 | 96 | carousel | 7/12/2023 17:45 | 36 | 294 | 911 | Wednesday | positive | |
| 96 | 97 | video | 10/27/2023 23:45 | 314 | 108 | 458 | Friday | neutral | |
| 97 | 98 | text | 8/5/2023 8:45 | 229 | 179 | 38 | Saturday | positive | |
| 98 | 99 | poll | 12/29/2023 12:15 | 5000 | 500 | 204 | Friday | positive | |
| 99 | 100 | image | 6/6/2023 21:00 | 4483 | 357 | 25 | Tuesday | neutral |
100 rows × 9 columns
[31]:
| platform | sum | mean | count | |
|---|---|---|---|---|
| 0 | 1649 | 51.531250 | 32 | |
| 1 | 2069 | 57.472222 | 36 | |
| 2 | 1332 | 41.625000 | 32 |
[32]:
<Axes: xlabel='platform', ylabel='post_id'>
[34]:
| sentiment_score | sum | mean | count | |
|---|---|---|---|---|
| 0 | negative | 1384 | 51.259259 | 27 |
| 1 | neutral | 1337 | 49.518519 | 27 |
| 2 | positive | 2329 | 50.630435 | 46 |
[35]:
<Axes: xlabel='sentiment_score', ylabel='post_id'>
[36]:
sentiment_score positive 46 neutral 27 negative 27 Name: count, dtype: int64
[38]:
| sentiment_score | sum | mean | count | |
|---|---|---|---|---|
| 0 | negative | 1384 | 51.259259 | 27 |
| 1 | neutral | 1337 | 49.518519 | 27 |
| 2 | positive | 2329 | 50.630435 | 46 |
[39]:
<Axes: xlabel='sentiment_score', ylabel='count'>
[40]:
<Axes: xlabel='sentiment_score', ylabel='post_id'>
[41]:
<Axes: ylabel='Count'>
Common Tools
No metadata.
Advanced Tools
No metadata.
Anaconda Assistant
AI-powered coding, insights and debugging in your notebooks.
To enable the following extensions, create an account or sign in.
- Anaconda Assistant4.1.0
- Coming soon!
- Data Catalogs
- Panel Deployments
- Sharing
Already have an account? Sign In
For more information, read our Anaconda Assistant documentation.